<?php
		function  get_tour_price_table_excel_file()
		{
				//$upload = wp_upload_dir();		
				global $post,$wpdb;
				
				$attachment_id = get_post_meta(get_the_ID(),$wpdb->prefix.'price_table',true);				
				$filename = get_attached_file($attachment_id);
				
				//$filename = get_option("file_price_table");
				//$filename = $upload['basedir'].$filename;		
				//echo $filename;		
				$wp_filetype = wp_check_filetype(basename($filename), null );								
				if(file_exists($filename) && $wp_filetype['ext']=='xls')
				{
					return $filename;
				}			
		}

		$filename =get_tour_price_table_excel_file();
		
		
		if($filename) 
		{		
			require_once (TEMPLATEPATH . '/IOs/excel_reader.php' );	
			error_reporting(E_ALL ^ E_NOTICE);
			$data = new Spreadsheet_Excel_Reader($filename); 
			echo $data->dump();
		}
		else 
		{
			echo 'Not update Price table';
		}
?>